import request from '@/utils/http';

export function getSampesList(params: any) {
    return request({
        url: 'biosample/samples/list-vo',
        method: 'get',
        params,
    });
}
// 采集地点
export function getSampesAddress() {
    return request({
        url: 'biosample/samples/dict-list',
        method: 'get',
    });
}

// 样本类型
export function getSampesType() {
    return request({
        url: 'biosample/sampletype/AllTypeList',
        method: 'get',
    });
}
// 采集录入 
export function saveSamples(data: any) {
    return request({
        url: 'biosample/samples/save-collect',
        method: 'post',
        data,
    });
}

// 
export function getSampesByCreator() {
    return request({
        url: 'biosample/samples/getLastOneByCreator',
        method: 'get',
    });
}

// 申请入库
export function getSampesReview(data: any) {
    return request({
        url: 'biosample/samples/apply',
        method: 'post',
        data
    });
}
// 删除
export function sampeswDelete(data: any) {
    return request({
        url: 'biosample/samples/delete',
        method: 'post',
        data
    });
}

// 出库
export function sampesRemove(data: any) {
    return request({
        url: 'biosample/samples/out-stock',
        method: 'post',
        data
    });
}
// 单条信息
export function getIdSamples(id: any, params: any) {
    return request({
        url: 'biosample/samples/collect-info/' + id,
        method: 'get',
        params
    });
}

// 导出
export function exportSamples(params: any) {
    return request({
        url: 'biosample/samples/export-excel-collect',
        method: 'get',
        params,
        responseType: 'blob'
    });
}
export function getSampletype(id: any) {
    return request({
        url: 'biosample/sampletype/info/' + id,
        method: 'get',
    });
}

export function getIdCardDetail(id: any) {
    return request({
        url: 'biosample/donorsinfo/getByIdCard/' + id,
        method: 'get',
    });
}

